refactor: add explicit return type annotation#1171
Open
Lang-Qiu wants to merge 1 commit into
Open
Conversation
wesbillman
approved these changes
Jun 22, 2026
Collaborator
|
🤖 Thanks for the contribution. The code change looks behavior-neutral and safe, but the required DCO check is failing because the commit is missing a Since this PR has a single commit, please amend it with your DCO sign-off and force-push the branch: git commit --amend --no-edit --signoff
git push --force-with-lease origin auto-pr/type_annotations-1782148031While amending, please also keep If the DCO check still complains because the commit was authored by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题背景
公共函数缺少显式返回类型注解。虽然TypeScript可以推断,但显式注解遵循最佳实践,提高代码的可读性和可维护性。
修改内容
desktop/src/features/settings/sidebarUpdateCardVisibility.ts中,为函数shouldShowSidebarUpdateCard添加了显式返回类型注解: boolean。验证方式
npm test)验证。其他信息